	uniform mat4 lightViewMatrix;
	uniform mat4 lightProjectionMatrix;
	uniform mat4 cameraViewInverseMatrix;
	varying vec4 q;
	varying float zValue;
	void main()
	{		
		// Linear Z
		//vec4 vertexPosition;	
		//vertexPosition = gl_ModelViewProjectionMatrix * gl_Vertex;		
		//vertexPosition.z *= vertexPosition.w; // To have a linear z
		//gl_Position = vertexPosition;
		//		
		//q			 = lightProjectionMatrix * lightViewMatrix * gl_Vertex;
		//q *= q.w;
		
		vec4 vertexPosition = gl_ModelViewProjectionMatrix * gl_Vertex;	
		zValue		 = vertexPosition.z;
		gl_Position	 = vertexPosition;
		q			 = lightProjectionMatrix * lightViewMatrix  * cameraViewInverseMatrix * gl_ModelViewMatrix * gl_Vertex;
	}